using ConsoleApi.Models;
using MESData.ErrorCode;

namespace ConsoleApi.Services.Console
{
    /// <summary>
    /// 控制台服务接口
    /// </summary>
    public interface IConsoleService
    {
        // 通知公告相关
        Task<ApiResult<PagedResultDto<AnnouncementDto>>> GetAnnouncementsAsync(AnnouncementQueryDto query);
        Task<ApiResult<AnnouncementDto>> GetAnnouncementAsync(int id);
        Task<ApiResult<AnnouncementDto>> CreateAnnouncementAsync(AnnouncementDto dto);
        Task<ApiResult<AnnouncementDto>> UpdateAnnouncementAsync(AnnouncementDto dto);
        Task<ApiResult<bool>> DeleteAnnouncementAsync(int id);

        // 采购订单相关
        Task<ApiResult<PagedResultDto<PurchaseOrderDto>>> GetPurchaseOrdersAsync(PurchaseOrderQueryDto query);
        Task<ApiResult<PurchaseOrderDto>> GetPurchaseOrderAsync(int id);
        Task<ApiResult<PurchaseOrderDto>> CreatePurchaseOrderAsync(PurchaseOrderDto dto);
        Task<ApiResult<PurchaseOrderDto>> UpdatePurchaseOrderAsync(PurchaseOrderDto dto);
        Task<ApiResult<bool>> DeletePurchaseOrderAsync(int id);

        // 生产工单相关
        Task<ApiResult<PagedResultDto<ProductionOrderDto>>> GetProductionOrdersAsync(ProductionOrderQueryDto query);
        Task<ApiResult<ProductionOrderDto>> GetProductionOrderAsync(int id);
        Task<ApiResult<ProductionOrderDto>> CreateProductionOrderAsync(ProductionOrderDto dto);
        Task<ApiResult<ProductionOrderDto>> UpdateProductionOrderAsync(ProductionOrderDto dto);
        Task<ApiResult<bool>> DeleteProductionOrderAsync(int id);

        // 销售订单相关
        Task<ApiResult<PagedResultDto<ProductionSalesOrderDto>>> GetProductionSalesOrdersAsync(ProductionSalesOrderQueryDto query);
        Task<ApiResult<ProductionSalesOrderDto>> GetProductionSalesOrderAsync(int id);
        Task<ApiResult<ProductionSalesOrderDto>> CreateProductionSalesOrderAsync(ProductionSalesOrderDto dto);
        Task<ApiResult<ProductionSalesOrderDto>> UpdateProductionSalesOrderAsync(ProductionSalesOrderDto dto);
        Task<ApiResult<bool>> DeleteProductionSalesOrderAsync(int id);

        // 审批单据相关
        Task<ApiResult<PagedResultDto<ApprovalDocumentDto>>> GetApprovalDocumentsAsync(ApprovalDocumentQueryDto query);
        Task<ApiResult<ApprovalDocumentDto>> GetApprovalDocumentAsync(int id);
        Task<ApiResult<ApprovalDocumentDto>> CreateApprovalDocumentAsync(ApprovalDocumentDto dto);
        Task<ApiResult<ApprovalDocumentDto>> UpdateApprovalDocumentAsync(ApprovalDocumentDto dto);
        Task<ApiResult<bool>> DeleteApprovalDocumentAsync(int id);

        // 核心指标相关
        Task<ApiResult<List<CoreMetricsDto>>> GetCoreMetricsAsync(DateTime? startDate = null, DateTime? endDate = null);
        Task<ApiResult<CoreMetricsDto>> GetTodayCoreMetricsAsync();

        // 统计数据相关
        Task<ApiResult<List<StatisticsDto>>> GetStatisticsAsync(StatisticsQueryDto query);

        // 图表数据相关
        Task<ApiResult<ChartDataDto>> GetSalesChartDataAsync(string timeRange);
        Task<ApiResult<ChartDataDto>> GetPurchaseChartDataAsync(string timeRange);

        // 仓库相关
        Task<ApiResult<PagedResultDto<WarehouseDto>>> GetWarehousesAsync(WarehouseQueryDto query);
        Task<ApiResult<WarehouseDto>> GetWarehouseAsync(int id);
        Task<ApiResult<WarehouseDto>> CreateWarehouseAsync(WarehouseDto dto);
        Task<ApiResult<WarehouseDto>> UpdateWarehouseAsync(WarehouseDto dto);
        Task<ApiResult<bool>> DeleteWarehouseAsync(int id);

        // 生产物品相关
        Task<ApiResult<PagedResultDto<ProductionItemDto>>> GetProductionItemsAsync(ProductionItemQueryDto query);
        Task<ApiResult<ProductionItemDto>> GetProductionItemAsync(int id);
        Task<ApiResult<ProductionItemDto>> CreateProductionItemAsync(ProductionItemDto dto);
        Task<ApiResult<ProductionItemDto>> UpdateProductionItemAsync(ProductionItemDto dto);
        Task<ApiResult<bool>> DeleteProductionItemAsync(int id);

        // 工序相关
        Task<ApiResult<PagedResultDto<ProcessDto>>> GetProcessesAsync(ProcessQueryDto query);
        Task<ApiResult<ProcessDto>> GetProcessAsync(int id);
        Task<ApiResult<ProcessDto>> CreateProcessAsync(ProcessDto dto);
        Task<ApiResult<ProcessDto>> UpdateProcessAsync(ProcessDto dto);
        Task<ApiResult<bool>> DeleteProcessAsync(int id);


    }
} 